$("#companyBox").on('click', '.checkboxStyle', function () {
    $(this).children().attr('checked','true');
    $(this).addClass('selection').parent().siblings().children('.checkboxStyle').removeClass('selection');
});
$("#submission").click(function () {
    var customerId = $("#customerIdValue").val();
    var companyName = $("input[name='about']:checked").val();
    if(companyName == "" || companyName == null){
        alert("请选择一个company！")
        return;
    }
    var remarks = $("#remarks").val();
    $.ajax({
        url: Feng.ctxPath +"/customer/choicecompany",
        type:'POST',
        data:{
            customerId:customerId,
            remarks:remarks,
            companyName:companyName
        },
        success:function (data) {
            var isDorj=parent.$("#isDorj").val();
            if(isDorj=='qt'){
                Feng.success("保存成功!");
                window.parent.Customer.table.refresh();
                parent.layer.close(parent.layer.getFrameIndex(window.name));
            }else{
                Feng.success("保存成功!");
                window.parent.$('#calendar').fullCalendar('refecompanyhEvents');
                parent.layer.close(parent.layer.getFrameIndex(window.name));
            }
        },
        error:function (data) {alert("没有权限，请联系系统管理员！");}
    })
});